import React, { Component, createRef, RefObject } from 'react';
import {Form,FormInstance,Input} from 'antd'
class Login extends Component {
  formRef:RefObject<FormInstance>
  constructor(props:any,context:any) {
    super(props,context);
    this.formRef=createRef<FormInstance>()
  }

  render() {
    return (
      <>
        <Form
        ref={this.formRef}
        >
          <Form.Item
            label="用户名" name='name'>
            <Input/>
          </Form.Item>
          <Form.Item
            label="密码" name='password'>
            <Input/>
          </Form.Item>
        </Form>
      </>
    );
  }
}
export default Login;
